package ch6;

import java.util.Scanner;

public class Zuoye2 {//将一个正整数分解质因数。例如：输入90,打印出
    //90=2*3*3*5。
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        System.out.println("输入一个正整数：");
        int a = input.nextInt();
        int i = 2;
        System.out.print(a + "=");
        for (; i <= a;i++) {
            while (a % i == 0 && a != i) {
                a = a / i;
                System.out.print(i + "*");
            }
        }
        System.out.print(a);
    }
}
